package com.test08.excelpoi03;

import java.util.List;
/*
 * 用来封装某个站点的所有信息
 */
public class SummaryBean {
	private String station;
	private List<NFCBean> nfcBeans;
	
	
	private Integer passCount;
	private Integer sumCount;
	private double rate;
	
	public SummaryBean(String station, List<NFCBean> nfcBeans) {
		super();
		this.station = station;
		this.nfcBeans = nfcBeans;
//		通过数
		this.passCount = 0;
		for (NFCBean nfcBean : nfcBeans) {
			if (nfcBean.getEnable()) {
				this.passCount += 1;
			}
		}
//		总数
		this.sumCount = nfcBeans.size();
//		通过率
		this.rate = passCount*1.0 / sumCount;
	}
	public String getStation() {
		return station;
	}
	public void setStation(String station) {
		this.station = station;
	}
	public List<NFCBean> getNfcBeans() {
		return nfcBeans;
	}
	public void setNfcBeans(List<NFCBean> nfcBeans) {
		this.nfcBeans = nfcBeans;
	}
	public Integer getPassCount() {
		return passCount;
	}
	public Integer getSumCount() {
		return sumCount;
	}
	public double getRate() {
		return rate;
	}
	@Override
	public String toString() {
		return "SummaryBean [station=" + station + ", passCount=" + passCount + ", sumCount="
				+ sumCount + ", rate=" + rate + "]";
	}
	
	
	
}
